home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
CommResources.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
10KB
|
434 lines
;
; File: CommResources.a
;
; Contains: Communications Toolbox Resource Manager Interfaces.
;
; Version: Technology: System 7.5
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__COMMRESOURCES__') = 'UNDEFINED' THEN
__COMMRESOURCES__ SET 1
IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
include 'OSUtils.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
; tool classes (also the tool file types)
classCM EQU 'cbnd'
classFT EQU 'fbnd'
classTM EQU 'tbnd'
; version of the Comm Resource Manager
curCRMVersion EQU 2 ; constants general to the use of the Communications Resource Manager
crmType EQU 9 ; queue type
crmRecVersion EQU 1 ; version of queue structure
; error codes
crmGenericError EQU -1
crmNoErr EQU 0
; data structures general to the use of the Communications Resource Manager
; typedef OSErr CRMErr
CRMRec RECORD 0
qLink ds.l 1 ; offset: $0 (0) ; reserved
qType ds.w 1 ; offset: $4 (4) ; queue type -- ORD(crmType) = 9
crmVersion ds.w 1 ; offset: $6 (6) ; version of queue element data structure
crmPrivate ds.l 1 ; offset: $8 (8) ; reserved
crmReserved ds.w 1 ; offset: $C (12) ; reserved
crmDeviceType ds.l 1 ; offset: $E (14) ; type of device, assigned by DTS
crmDeviceID ds.l 1 ; offset: $12 (18) ; device ID; assigned when CRMInstall is called
crmAttributes ds.l 1 ; offset: $16 (22) ; pointer to attribute block
crmStatus ds.l 1 ; offset: $1A (26) ; status variable - device specific
crmRefCon ds.l 1 ; offset: $1E (30) ; for device private use
sizeof EQU * ; size: $22 (34)
ENDR
; typedef struct CRMRec * CRMRecPtr
;
; pascal CRMErr InitCRM(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_InitCRM
move.w #$0501,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION InitCRM
ENDIF
;
; pascal QHdrPtr CRMGetHeader(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetHeader
move.w #$0502,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetHeader
ENDIF
;
; pascal void CRMInstall(CRMRecPtr crmReqPtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMInstall
move.w #$0503,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMInstall
ENDIF
;
; pascal OSErr CRMRemove(CRMRecPtr crmReqPtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMRemove
move.w #$0504,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMRemove
ENDIF
;
; pascal CRMRecPtr CRMSearch(CRMRecPtr crmReqPtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMSearch
move.w #$0505,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMSearch
ENDIF
;
; pascal short CRMGetCRMVersion(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetCRMVersion
move.w #$0506,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetCRMVersion
ENDIF
;
; pascal Handle CRMGetResource(ResType theType, short theID)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetResource
move.w #$0507,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetResource
ENDIF
;
; pascal Handle CRMGet1Resource(ResType theType, short theID)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGet1Resource
move.w #$0508,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGet1Resource
ENDIF
;
; pascal Handle CRMGetIndResource(ResType theType, short index)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetIndResource
move.w #$0509,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetIndResource
ENDIF
;
; pascal Handle CRMGet1IndResource(ResType theType, short index)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGet1IndResource
move.w #$050A,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGet1IndResource
ENDIF
;
; pascal Handle CRMGetNamedResource(ResType theType, ConstStr255Param name)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetNamedResource
move.w #$050B,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetNamedResource
ENDIF
;
; pascal Handle CRMGet1NamedResource(ResType theType, ConstStr255Param name)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGet1NamedResource
move.w #$050C,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGet1NamedResource
ENDIF
;
; pascal void CRMReleaseResource(Handle theHandle)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMReleaseResource
move.w #$050D,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMReleaseResource
ENDIF
;
; pascal Handle CRMGetToolResource(short procID, ResType theType, short theID)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetToolResource
move.w #$0523,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetToolResource
ENDIF
;
; pascal Handle CRMGetToolNamedResource(short procID, ResType theType, ConstStr255Param name)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetToolNamedResource
move.w #$0526,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetToolNamedResource
ENDIF
;
; pascal void CRMReleaseToolResource(short procID, Handle theHandle)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMReleaseToolResource
move.w #$0524,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMReleaseToolResource
ENDIF
;
; pascal long CRMGetIndex(Handle theHandle)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetIndex
move.w #$050E,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetIndex
ENDIF
;
; pascal short CRMLocalToRealID(ResType bundleType, short toolID, ResType theType, short localID)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMLocalToRealID
move.w #$050F,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMLocalToRealID
ENDIF
;
; pascal short CRMRealToLocalID(ResType bundleType, short toolID, ResType theType, short realID)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMRealToLocalID
move.w #$0510,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMRealToLocalID
ENDIF
;
; pascal OSErr CRMGetIndToolName(OSType bundleType, short index, Str255 toolName)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMGetIndToolName
move.w #$0511,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMGetIndToolName
ENDIF
;
; pascal OSErr CRMFindCommunications(short *vRefNum, long *dirID)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMFindCommunications
move.w #$051A,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMFindCommunications
ENDIF
;
; pascal Boolean CRMIsDriverOpen(ConstStr255Param driverName)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMIsDriverOpen
move.w #$0521,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMIsDriverOpen
ENDIF
;
; pascal CRMErr CRMParseCAPSResource(Handle theHandle, ResType selector, unsigned long *value)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMParseCAPSResource
move.w #$0525,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMParseCAPSResource
ENDIF
;
; pascal OSErr CRMReserveRF(short refNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMReserveRF
move.w #$0513,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMReserveRF
ENDIF
;
; pascal OSErr CRMReleaseRF(short refNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_CRMReleaseRF
move.w #$0514,-(sp)
move.l sp,A0
dc.w $A08B
addq.w #2,sp
EndM
ELSE
IMPORT_CFM_FUNCTION CRMReleaseRF
ENDIF
ENDIF
ENDIF ; __COMMRESOURCES__